package com.design.observe;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Observer2 implements Observer{

    private Subject subject;

    public Observer2(Subject subject){
        this.subject=subject;
        subject.registerObserver(this);
    }

    @Override
    public void update(String msg) {
        log.info("observe2 rcv :{}",msg);
    }
}
